function BSPError(error) {
  this.name = error.code || '00000';
  this.message = error.msg || '服务器异常，请稍后再试';
  this.stack = (new Error()).stack;
}

BSPError.prototype = Object.create(Error.prototype);
BSPError.prototype.constructor = BSPError;

exports = module.exports = BSPError;